Skip to content

get edited asset URL from PHP; stop adding timestamp#598

Draft
i-just wants to merge 4 commits into
5.xfrom
bugfix/595-image-editor-asset-url
Draft

get edited asset URL from PHP; stop adding timestamp#598
i-just wants to merge 4 commits into
5.xfrom
bugfix/595-image-editor-asset-url

Conversation

@i-just

@i-just i-just commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

Description

Changes in this PR:

  • when editing an image without a transform, call CkeditorController::actionImageUrl() so that events can do their thing and so that GeneralConfig::revAssetUrls is respected.
  • when editing an image with a transform, the request goes through Assets::generateTransform(), which should ensure the correct URL is returned
  • only add timestamp to the URL if revAssetUrls is set to false (the default), as in that case we need something to indicate that the image should be reloaded, even if the URL is the same

The regex in _srcInfo() was greedy because the query string can be a part of the asset’s URL. This is the case, e.g. when using Servd’s Assets and Helpers plugin. That’s why I’m leaving it as is.

Related issues

#595
#477

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant